package com.lei.design.decorator.coffee.condiment;

import com.lei.design.decorator.Beverage;

/**
 * @Author LeiXiaoLei
 * @Date 2022/5/16 10:57
 * @Version 1.0
 */
public class Milk extends CondimentDecorator {
    private final Beverage beverage;

    public Milk(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public double cost() {
        return beverage.cost() + 1.1;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + ",Milk";
    }
}
